﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IStartable.cs" company="">
//   
// </copyright>
// <summary>
//   The Startable interface.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

using System;

namespace Libium.Core
{
    /// <summary>
    ///   The Startable interface.
    /// </summary>
    public interface IStartable
    {
        event Action<IStartable> BeforeStart;
        event Action<IStartable> AfterStart;
        event Action<IStartable> BeforeStop;
        event Action<IStartable> AfterStop;

        #region Public Properties

        /// <summary>
        ///   Gets a value indicating whether is started.
        /// </summary>
        bool IsStarted { get; }

        #endregion

        #region Public Methods and Operators

        /// <summary>
        ///   The start.
        /// </summary>
        void Start();

        /// <summary>
        ///   The stop.
        /// </summary>
        void Stop();

        #endregion
    }
}